home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / SHARED.DIR / 03076_Script_GET CATEGORY-INVENTION HANDLERS < prev    next >
Text File  |  1996-04-01  |  2KB  |  34 lines

  1. -- -----------------------------------------------------------
  2. -- Handler getCategoryFromInventionName returns the category
  3. -- of the given invention.
  4.  
  5. on getCategoryFromInventionName whichInvention
  6.   if ("helicopter landinggear parachute Wing" contains whichInvention) then return "Flight"
  7.   else  if ("BellTower drums Viola Woodwind" contains whichInvention) then return "Music"
  8.   else  if ("WalkingBuoys diving lifepreserver paddleboat Snorkel" contains whichInvention) then return "Water"
  9.   else  if ("BridgeCanal drawbridge fortress dredger" contains whichInvention) then return "Civil"
  10.   else  if ("Cannon Crossbow Tank Walls" contains whichInvention) then return "Weapons"
  11. end
  12.  
  13. -- -----------------------------------------------------------
  14. -- Handler getCategoryFromMonaLisaMovieName returns the category
  15. -- of the given mona list movie.
  16.  
  17. on getCategoryFromMonaLisaMovieName whichMovie
  18.   if (whichMovie = "ML_Fligh.DIR") then return "Flight"
  19.   else if (whichMovie = "ML_Music.DIR") then return "Music"
  20.   else if (whichMovie = "ML_Water.DIR") then return "Water"
  21.   else if (whichMovie = "ML_Civil.DIR") then return "Civil"
  22.   else if (whichMovie = "ML_Weapo.DIR") then return "Weapons"
  23. end
  24.  
  25. -- -----------------------------------------------------------
  26. -- Handler getInventionMovieName returns the name of the movie
  27. -- of the given invention.
  28.  
  29. on getInventionMovieName whichInvention
  30.   put "I_" & char 1 to 6 of whichInvention into tempResult
  31.   return tempResult & ".DIR"
  32. end
  33.  
  34.